import { fromJS } from 'immutable';
import * as constants from './constants';

const defaultState = fromJS({
  login: true,
});

export default (state = defaultState, action: any) => {
  switch (action.type) {
    case constants.LOGIN_STATUS_TOGGLE:
      return state.set('login', action.value);
    default:
      return state;
  }
};
